package NO01;

/**
 * 01-饿汉模式
 * @author swg
 */
public class Singleton01 {
	//私有化构造方法
	private Singleton01(){}
	//饿汉,直接new出来
	private static Singleton01 instance = new Singleton01();
	//公共方法获取实例对象
	public static Singleton01 getInstance(){
		return instance;
	}
}
